//
//  TopSlideCell.m
//  庐山通
//
//  Created by zcj on 15-10-28.
//  Copyright (c) 2015年 郑朝军. All rights reserved.
//
#import "UIImageView+WebCache.h"
#import "TopSlideCell.h"
#import "HeaderModel.h"

@interface TopSlideCell()
@property (nonatomic,weak)UIImageView *TopImageView;
@end
@implementation TopSlideCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        UIImageView *topImage = [[UIImageView alloc]init];
        [self addSubview:topImage];
        self.TopImageView = topImage;
        // Initialization code
    }
    return self;
}
+(instancetype)TopSlideCell:(UICollectionView *)collection collectionIndex:(NSIndexPath *)index
{
    static NSString * ID = @"topslide";
    TopSlideCell * cell = [collection dequeueReusableCellWithReuseIdentifier:ID forIndexPath:index];
    return cell;
}
- (void)setImageUrl:(NSString *)imageUrl
{
    _imageUrl = imageUrl;
    [self.TopImageView setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:[UIImage imageNamed:@"shuangfu"]];
    
    self.TopImageView.frame = self.frame;

}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
